package com.gong.DesignPattern.VisitorPattern;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/7/8 0008 9:03
 */
public class UpdateVisitor implements Visitor{
    @Override
    public void visitCPU(Cpu cpu) {
        cpu.commend += ": 1+1=2";
    }

    @Override
    public void visitRam(Ram ram) {
        ram.commend += ": 记住1+1=2";
    }
}
